import { createSignal } from 'solid-js'
import { useNavigate } from '@solidjs/router'
export function Home() {
    const [count, setCount] = createSignal(0);
    const redirect = useNavigate();
    const add = () => setCount(count() + 1);
    const toAbout = () => {
        redirect('/about')
    };
    return (
        <div>
            <h1>{count()}</h1>
            <button onClick={add}>+</button>
            <button onClick={toAbout}>about</button>
        </div>
    )
}